// 专门用来加载vant组件
import Vue from 'vue'
import {
  Button,
  Cell,
  CellGroup,
  Tab,
  Tabs,
  List,
  Toast,
  Skeleton,
  Lazyload,
  NavBar,
  Icon,
  PullRefresh,
  Notify,
  IndexBar,
  IndexAnchor,
  Image,
  Divider,
  Form,
  Field,
  Tag,
  CountDown,
  Dialog,
  Popup,
  Area,
  Search
} from 'vant';
[
  Button,
  Cell,
  CellGroup,
  Tab,
  Tabs,
  List,
  Toast,
  Skeleton,
  NavBar,
  Icon,
  PullRefresh,
  Notify,
  IndexBar,
  IndexAnchor,
  Image,
  Divider,
  Form,
  Field,
  Tag,
  CountDown,
  Dialog,
  Popup,
  Area,
  Search
].forEach(cmp => Vue.use(cmp));

// 图片懒加载
Vue.use(Lazyload, {
  loading: 'http://www.mobiletrain.org/images/index/new_logo.png',
  preload: '1.3',
  attempt: 10
});